package a01demo1;

import java.util.ArrayList;

public class Test2 {
    public static void main(String[] args) {
        ArrayList<String> list1 = new ArrayList<>();
        list1.add("ab");
        list1.add("a");
        list1.add("ac");

        list1.stream().filter(s -> s.startsWith("a")).filter(s -> s.length() == 2).forEach(s -> System.out.println(s));
    }
}
